<?php get_header();?>
<?php $theme_options = get_option('po_theme'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post();
		// GET CUSTOM SIDEBAR
		$sidebar = get_post_meta($post->ID, 'sidebar_value', true);
?>
	<div id="content">
	<div id="cc">
		<div id="bread">
			<div id="breadbox">
				<?php // BREADCRUMBS
					if (function_exists('yoast_breadcrumb')) {yoast_breadcrumb('<div id="breadcrumbs">','</div>');}
				?>
				<div class="clear"><!-- --></div>
			</div><!-- end breadbox -->
		</div>
		<div id="contentbox" class="w620">

		<div id="title">
			<h1 class="bline"><?php the_title(); ?></h1>
		</div><!-- end title -->

			<?php the_content(); ?>
			<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

			<div class="clear"><!-- hello --></div>

			<?php comments_template(); ?>

			<?php endwhile; else: ?>
			<div id="contentbox" class="w620">
			<div id="title">
			<h1 class="bline">404</h1>
			</div><!-- end title -->
			<p>Sorry, no posts matched your criteria.</p>
			<?php endif; ?>
		</div><!-- end contentbox -->

			<ul id="sidebar">
				<?php // DISPLAY CUSTOM SIDEBAR
				if ($sidebar) { if ( function_exists('dynamic_sidebar') && dynamic_sidebar($sidebar)) ;}
				else { if (function_exists('dynamic_sidebar') && dynamic_sidebar('Default Sidebar')) ;}
				?>
			</ul><!-- end sidebar -->

<?php get_footer(); ?>